package com.itheima.thread.api.demo03;

import java.util.concurrent.TimeUnit;

public class MyThread extends Thread {

    @Override
    public void run() {
        for(int x = 0; x < 100; x++) {

            System.out.println(Thread.currentThread().getName() + "----" + x);

            try {

                //Thread.sleep(1000);
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
    }
}
